
using Microsoft.Identity.Client;
using System.ComponentModel;

namespace JTZY.Model.Goods.Dto
{
    /// <summary>
    /// 良品仓查询对象
    /// </summary>
    public class CorecmsuserstockQueryDto : PagerInfo
    {
        public long? UserId { get; set; }
        public string sn { get; set; }
        public int? categoryId { get; set; }
        public int? mini { get; set; }
        public long? cusUserId { get; set; }
        public bool HasStock { get; set; }
        public int? GoodsId { get; set; }
        public string categoryArr { get; set; }

    }

    /// <summary>
    /// 良品仓输入输出对象
    /// </summary>
    public class CorecmsuserstockDto
    {
        [Required(ErrorMessage = "序列不能为空")]
        public long Id { get; set; }

        [Required(ErrorMessage = "商品序列不能为空")]
        public int GoodId { get; set; }

        [Required(ErrorMessage = "货品序列不能为空")]
        public int ProductId { get; set; }

        [Required(ErrorMessage = "成本价不能为空")]
        public decimal ProductCostPrice { get; set; }
        public DateTime? CreateTime { get; set; }

        public DateTime? UpdateTime { get; set; }

        [Required(ErrorMessage = "是否删除不能为空")]
        public bool IsDel { get; set; }

        public int? Stock { get; set; }

        public int? Marketable { get; set; }



        public int? MinStock { get; set; }

        public int? UserId { get; set; }

        public int? StockWarn { get; set; }

        public string SkuLocation { get; set; }

        public string SkuName { get; set; }

        public string SkuImage { get; set; }

        public int? SkubrandId { get; set; }

        public string PurStock { get; set; }

        public string SaleStock { get; set; }

        public decimal? InvalVip0 { get; set; }

        public decimal? InvalVip1 { get; set; }

        public decimal? InvalVip2 { get; set; }

        public decimal? InvalVip3 { get; set; }

        public decimal? InvalVip4 { get; set; }

        public decimal Vip0 { get; set; }
        public decimal Vip1 { get; set; }
        public decimal Vip2 { get; set; }
        public decimal Vip3 { get; set; }
        public decimal Vip4 { get; set; }

        [ExcelColumn(Name = "是否删除")]
        public string IsDelLabel { get; set; }
    }

    public class usersgoodsDto
    {
        [ExcelIgnore(true)]
        public int goodId { get; set; }
        [ExcelColumnName("商品编码")]
        [ExcelColumnWidth(30)]
        public string bn { get; set; }
        [ExcelColumnName("商品名称")]
        [ExcelColumnWidth(30)]
        public string name { get; set; }
        [ExcelColumnName("商品类别")]
        [ExcelColumnWidth(30)]
        public string catetoryName { get; set; }
        [ExcelIgnore(true)]
        public string image { get; set; }
       
        [ExcelColumnName("库存")]
        [ExcelColumnWidth(10)]
        public int stock { get; set; }
        [ExcelColumnName("累计销量")]
        [ExcelColumnWidth(10)]
        public int saleQty { get; set; }

        [ExcelColumnName("品牌")]
        [ExcelColumnWidth(20)]
        public string brandName { get; set; }

        [ExcelColumnName("未上架单品数")]
        [ExcelColumnWidth(10)]
        public int prodCount { get; set; }

        [ExcelColumnName("状态")]
        [ExcelColumnWidth(20)]
        public string marketable { get; set; }
       
        [ExcelIgnore(true)]
        public int? goodsCategoryId { get; set; }
    }

    public class StockWarnUpdataDto
    {
        public StockWarnUpdataDto()
        {
            details = new List<StockWarnGoodsDetailDto>();
        }
        public List<StockWarnGoodsDetailDto> details { get; set; }

        public int globalStockWarn { get; set; }

        public int globalStockWarnType { get; set; }

        public long userId { get; set; }
    }

    public class StockWarnGoodsDetailDto
    {
        public long goodsId { get; set; }

        public long productId { get; set; }

        public int stockWarn { get; set; }

        public int stockWarnType { get; set; } = -1;
    }
    /// <summary>
    /// 铺货分页查询dto
    /// </summary>
    public class PurStockManageQueryDto : PagerInfo
    {
        public int userId { get; set; }

        public string catetoryIds { get; set; }

        public string goodName { get; set; }

        public int salePriceSetted { get; set; } = -1;
    }

    public class PurStockManageDetailQueryDto
    {
        public int userId { get; set; }

        public int goodsId { get; set; }
    }


    public class ReStockQueryDto
    {
        public int userId { get; set; }

        public int? goodsId { get; set; }
    }
    public class ReStockMasterDto
    {
        public ReStockMasterDto()
        {
            details = new List<PurStockManageMasterhDto>();
        }
        public decimal? amountLimit { get; set; } = 0;
        public decimal? amountLimitUsed { get; set; }

        public List<PurStockManageMasterhDto> details { get; set; }
    }

    public class PurStockManageMasterhDto
    {
        public PurStockManageMasterhDto()
        {
            distributionSkuVOS = new List<PurStockManageDetailDto>();
        }

        public int userId { get; set; }
        public int distributionProdId { get; set; }
        public int prodId { get; set; }
        public string prodName { get; set; }
        public string pic { get; set; }
      

        public List<PurStockManageDetailDto> distributionSkuVOS { get; set; }
    }
    public class PurStockManageDetailDto
    {

        public int distributionSkuId { get; set; }
        public int distributionProdId { get; set; }
        public int skuId { get; set; }
        public string skuCode { get; set; }
        public string skuName { get; set; }
        public string prodCode69 { get; set; }
        public string categoryName { get; set; }
        public string properties { get; set; }
        public int? skuStocks { get; set; }
        public int sellerSkuStocks { get; set; }
        public int transitSkuNum { get; set; }
        public int? distributionStocks { get; set; }
        public int? stockWarningLine { get; set; }

        public string stockWarnType { get; set; } = "-1";
        public string brandName { get; set; }
        public decimal? costPrice { get; set; }
        public decimal? normalPrice { get; set; }
        public decimal? vip1Price { get; set; }
        public decimal? vip2Price { get; set; }
        public decimal? vip3Price { get; set; }
        public decimal? vip4Price { get; set; }
        public bool delFlag { get; set; }
        public string status { get; set; }

        //补货数量
        public int? purqty { get; set; }
    }
    /// <summary>
    /// 铺货管理
    /// </summary>
    public class PurStockManageDto
    {
        public int distributionProdId { get; set; }
        public int prodId { get; set; }
        public string pic { get; set; }
        public string prodName { get; set; }
        public string categoryName { get; set; }
        public string brandName { get; set; }
        public string prodCode { get; set; }
        public int skuNum { get; set; }
        public int totalStocks { get; set; }
        public int totalDistributionStocks { get; set; }
        public int skuWarningNum { get; set; }
        public int ownerId { get; set; }

        public DateTime? createTime { get; set; }
        public DateTime? updateTime { get; set; }
        public string prodStatus { get; set; }
        public string priceEmpty { get; set; }
    }

    public class InvalVipPriceUpdateDto
    {
        public int userId { get; set; }

        public int effectiveProducts { get; set; } = -1;
        /// <summary>
        /// 0:固定 1：比列
        /// </summary>
        public int increaseType { get; set; } = -1;
        public List<string> selectedCategoryIds { get; set; }

        public decimal vip0Price { get; set; }

        public decimal vip1Price { get; set; }
        public decimal vip2Price { get; set; }
        public decimal vip3Price { get; set; }
        public decimal vip4Price { get; set; }
    }

    public class ExportPurStockManageDto
    {
        [ExcelColumn(Name ="客户名称")]
        public string userName { get; set; }
        [ExcelColumn(Name = "商品名称")]
        public string goodName { get; set; }
        [ExcelColumn(Ignore =true)]
        public string categoryName { get; set; }
        [ExcelColumn(Name = "商品69码")]
        public string barCode { get; set; }
        [ExcelColumn(Name = "商品序列号")]
        public string sn { get; set; }
        [ExcelColumn(Name = "销售价格")]
        public decimal? salePrice { get; set; }
        [ExcelColumn(Name = "铺货数量")]
        public int purStock { get;set; }

    }

    public class ImportPurStockDto
    {
        public string 商品名称 { get; set; }
        public string 商品69码 { get; set; }

        public int 铺货数量 { get; set; }
    }

}